package com.yzt.plugin_widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.RelativeLayout;

/**
 * author : bob
 * date   : 2022/10/17
 * desc   :
 */
public class RelativeLayout43 extends RelativeLayout {

    public RelativeLayout43(Context context) {
        super(context);
    }

    public RelativeLayout43(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public RelativeLayout43(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        final int w = MeasureSpec.getSize(widthMeasureSpec);
        setMeasuredDimension(w, (int) (w * (4 * 1.0f / 3)));
    }
}
